teachInfo = function(){
	
	
	 var username = {
		        width: 200,labelWidth:40,
		        xtype: 'displayfield',
		        id: 'teacherName',
		        fieldLabel: '姓名',
		        readOnly:true
		    };
		    //政治面貌
		    var cobpolitical = {
		            width: 200,
		            allowBlank: false,    
		            xtype: 'displayfield',
		            id: 'political',
		            fieldLabel: '政治面貌',
		            readOnly:true
		        };
		    //毕业院校
		    var finishschool = {
		        name: 'finishschool',
		        width: 200,
		        allowBlank: false,
		        readOnly:true,
		        xtype: 'displayfield',
		        id: 'finishschool',
		        fieldLabel: '毕业院校'
		       
		    };
		    //年龄
		    var age = {
		    		fieldLabel: '年龄',
		            width: 117,
		            xtype: 'displayfield',
		            decimalPrecision: 0,
		            minValue: 1,
		            maxValue: 60,
		            name: 'age',
		            id:'age',

		            readOnly:true
		         
		    };
		    //学院
		    var academybox = {
		            width: 200,
		            allowBlank: false,    
		            xtype: 'displayfield',
		            id: 'academy',
		          
		            fieldLabel: '学院',
		            readOnly:true
		          
		        };
		    
		    //第一列包含4行
		    var column1 = {
		        columnWidth: .30,
		        height:150,
		        layout: 'form',
		        xtype:'panel',
		        border:false,
		        labelWidth:40,
		        defaults:
	            {                     
	                layout: 'anchor', 
	                defaults: {   anchor: '100%'  } 
	            },
		        style:'margin-left:50px;margin-top:50px',
		        items: [
		                    username, cobpolitical, finishschool, age, academybox
		                ]
		    };
		    //------------第一列内容结束-------------//
		    //------------第二列内容开始-------------//
		    //性别
		    var rdosex = {
		        fieldLabel: '性别',
		        id: 'sex',
		        xtype: 'displayfield',
		        width: 200,
		        readOnly:true,
		        style: 'padding-top:3px;height:17px;',
		        renderer:function(value,v,obj){
		        	  if(value==0){
		        	       return '男';
		        	     }else if(value==1){
		        	      return '女';
		        	     } else{
		        	      return '未知';
		        	     }
		        	}
		       
		    };
		    var teacherJob = {
		            width: 200,
		            allowBlank: false,    
		            xtype: 'displayfield',
		            id: 'job',
		            readOnly:true,
		            
		            fieldLabel: '职称'
		        
		        };
		    
		    //email
		    var email = {
		        width: 200,
		        xtype: 'displayfield',
		        allowBlank: false,
		        maxLength: 30,
		        id: 'email',
		        fieldLabel: '邮箱',
		        readOnly:true,
		      
		        vtype: 'email'
		    };
		    //联系电话
		    var phone = {
		        width: 200,
		        xtype: 'displayfield',
		        allowBlank: false,
		        maxLength: 20,
		        id: 'phone',
		        fieldLabel: '联系电话',
		        readOnly:true
		      
		    };
		  //专业数据
		    var professionalstore = {
		            xtype: 'Ext.data.Store',
		            singleton : true,
		            proxy:{ 
		            	type:'ajax',
		            	url: 'publicDictAction.action' ,      
		            	reader: { 
		            		type: 'json', 
		            		root: 'list' 
		            	},
		            	extraParams:{
		            		publicCode:'professional'
		            	}
		            },
		            fields:['valueId','valueName'],
		            autoLoad: true
		        };
		  //专业
		    var professionalbox = {
		        width: 200,
		        xtype: 'displayfield',
		        allowBlank: false,
		        maxLength: 20,
		        id: 'professional',
		        fieldLabel: '专业',
		        readOnly:true,
		        renderer:function(value,v,obj){
		        	/* var index = professionalstore.find('valueId',value); 
        			 if(index != -1){
        				 var r = professionalstore.getAt(index);
        				 return r.get("valueName");
        			 }else{
        				 return '其他';
        			 }*/
		        	 if(value==1){
		        	       return '计算机科学与技术';
		        	     }else if(value==2){
		        	      return '数字媒体技术';
		        	     } else{
		        	      return '未知';
		        	     }
		        	}
		      
		    };
		      
		    //第二列包含4行
		    var column2 = {
		        columnWidth: .30,
		        xtype:'panel',
		        border:false,
		        layout: 'form',
		        defaults:
	            {                     
	                layout: 'anchor', 
	                defaults: {   anchor: '100%'  } 
	            },
		        style:'margin-left:50px;margin-top:50px',
		        items: [rdosex, teacherJob, email, phone, professionalbox]
		    };
		    //------------第二列内容结束-------------//
		    
		    //------------第四列内容开始-------------//
		    //创建相片div组件
		    var imagebox = {
		    	xtype:'panel',
		    	width:80,
		    	height:100,
		    	style: 'clear:both;margin-left:37px;border:1px solid blue; margin-bottom:8px',
		    	items:{
		        xtype: 'box',
		        id:'teacherImage',
		 
		        autoEl: {
		            width: 80,         
		           // style: '',
		            tag: 'img'
		            
		            //id: 'user.save.photoshow.' + user.IntUserID,
		           // src: (user.StrImagePath === '' || user.StrImagePath === undefined) ? nophone : user.StrImagePath
		        }}
		    };
		 
		    //每4列定义
		    var column4 = new Ext.FormPanel({
		        columnWidth: .23,
		        id:'photoFrom',
		        fileUpload: true,
		        enctype: 'multipart/form-data',
		        border:0,
		        buttonAlign: 'center',
		        //layout: 'form',
		        style:'margin-left:45px;margin-top:50px;',
		        items: [imagebox
		        ]      
		    });
	  
		    //提示
		    var lab = {
		    		
		    	        xtype: 'label',
		    	        forId: 'myFieldId',
		    	        text: '你暂时还没有分配导师！',
		    	        id:'lab'
		    	    
		    	    };
		  //备注
			var remark ={
					//width: 500,
					xtype: 'displayfield',
				//	readOnly:true,
					id: 'remark',
					//rows:5,
					fieldLabel: '简介',
					labelWidth: 40
				}
		   
		    
		    //表单
		    var form = {
		        frame: true,  
		        xtype: 'form',
		        iconCls: 'nodeicon',
		        title: '导师信息',
		        id:'teacherForm',
		       // width: 850,
		        //height: 570,
		        //labelWidth: 150,
		        //buttonAlign: 'center',
		       
		        items: [{
		            layout: 'column',
		            items: [
		                        column1,
		                        column2,
		            	       	//column3,
		                        column4
		                    ]
		        	},remark]
		       //
		    };

		    Ext.Ajax.request( {
		    	url : "getTeacherInfoByStudentIdAction.action", 
		    	params : {
		    		
		    	}, //参数
		    	success : function(response, option) {
		    		var obj = Ext.decode(response.responseText);
		    		if(!obj.success){
		    			Ext.Msg.alter("提示",obj.msg);
		    			return;
		    		}
		    		if(obj.list == null || obj.list.length <= 0){
		    			Ext.getCmp('teacherForm').hide();
		    			Ext.Msg.alert("提示", "你暂时还没有分配导师！");
		    			return;
		    		}else{
		    			Ext.getCmp('lab').hide();
		    		Ext.getCmp("teacherName").setValue(obj.list[0].teacherName);
		    		Ext.getCmp("email").setValue(obj.list[0].email);
		    		Ext.getCmp("phone").setValue(obj.list[0].phone);
		    		Ext.getCmp("job").setValue(obj.list[0].job.valueName);
		    		obj.list[0].photo != null ? Ext.getCmp('teacherImage').getEl().dom.src= obj.list[0].photo:"";
		    		//alert(obj.list[0].photo);
		    		Ext.getCmp('political').setValue(obj.list[0].political.valueName);
		    		//Ext.getCmp('synopsis').setValue(obj.list[0].synopsis);
		    		Ext.getCmp('age').setValue(obj.list[0].age);
		    		Ext.getCmp('finishschool').setValue(obj.list[0].finishSchool);
		    		Ext.getCmp('sex').setValue(obj.list[0].sex);
		    		Ext.getCmp('academy').setValue(obj.list[0].academy.valueName);
		    		Ext.getCmp('professional').setValue(obj.list[0].professional.valueId);
		    		Ext.getCmp('remark').setValue(obj.list[0].synopsis);
		    		}
		    	},
		    	failure : function(response, option) {
		    		Ext.Msg.alert("失败", "系统错误");
		    	}
		    	});
		    //------------事件处理方法开始-------------//
		   
		    //------------事件处理方法结束-------------//
		    
		   var form1 = Ext.create('Ext.panel.Panel', {
		       
		        renderTo: Ext.getBody(),
		        items: [form,lab]
		    });
		   return form1;
		    
		    
		    
	
	
}